/*
 * @(#)WorkflowContentStoreHandler.java
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */
package com.dcivision.workflow.core;

import java.io.InputStream;

/**
 * <p>Class Name:       WorkflowContentStoreHandler.java    </p>
 * <p>Description:      The interface consists of the default functions of a content store should have.</p>
 * @author              Angus Shiu
 * @company             DCIVision Limited
 * @creation date       02/12/2003
 * @version             $Revision: 1.3 $
 */
public interface WorkflowContentStoreHandler {
  
  /** indicate this is file name property */
  public static final String FILE_NAME_PROPERTY = "WORKFLOW.FILE_NAME";
  
  /** indicate this is file name property */
  public static final String FILE_PHYSICAL_PATH = "WORKFLOW.FILE_PHYSICAL_PATH";
  
  /** indicate this is a file content */
  public static final String FILE_CONTENT_PROPERTY = "WORKFLOW.FILE_CONTENT";
  
  /** indicate this is a file size property */
  public static final String FILE_SIZE_PROPERTY = "WORKFLOW.FILE_SIZE";
  
  /** indicate this is a file extension property */
  public static final String FILE_EXTENSION_PROPERTY = "WORKFLOW.FILE_EXTENSION";
  
  /**
   * Sets the properties of the file
   * 
   * @param properties
   *          The DocumentProperties object
   */
  public void setProperties(DocumentProperties properties);
  /**
   * Gets the DocumentProperties object
   * 
   * @return The DocumentProperties object
   */
  public DocumentProperties getProperties();
  /**
   * Sets a specific property
   * 
   * @param propertyName
   *          The property name
   * @param propertyValue
   *          The property value
   */
  public void setProperty(String propertyName, Object propertyValue);
  /**
   * Gets the content type of the file
   * 
   * @return The content type
   */
  public String getContentType();
  /**
   * Gets the file extension
   * 
   * @return The file extension
   */
  public String getExtension();
  /**
   * Gets the value of a specfic property
   * 
   * @param propertyName
   *          The property name
   * @return The value of the property
   */
  public Object getProperty(String propertyName);
  public byte[] read() throws ContentStoreException;
  public InputStream readStream() throws ContentStoreException;
  public void write() throws ContentStoreException;
  public void delete() throws ContentStoreException;
  public void close() throws ContentStoreException;
}
